﻿using System;
using System.Collections.Generic;

using System.Text;

namespace AuroraLightsFX
{
    public class PacketData : GroupBase
    {
        // Fields
        private ThemeDataset.ActionsRow[] _actions;
        private bool _fixedZone;
        private bool _loop;
        private int _zoneID;

        // Methods
        public PacketData(string name, int zoneID, bool fixedZone)
            : base(name)
        {
            this._loop = false;
            this._fixedZone = false;
            this._zoneID = zoneID;
            this._fixedZone = fixedZone;
        }

        public void AddLed(Led led)
        {
            if (base._leds.IndexOf(led) == -1)
            {
                base._leds.Add(led);
            }
        }

        public void RemoveLed(Led led)
        {
            base._leds.Remove(led);
        }

        public void SetActions(ThemeDataset.ActionsRow[] actions, bool loop)
        {
            this._actions = actions;
            this._loop = loop;
        }

        // Properties
        public ThemeDataset.ActionsRow[] Actions
        {
            get
            {
                return this._actions;
            }
        }

        public bool FixedZone
        {
            get
            {
                return this._fixedZone;
            }
        }

        public bool Loop
        {
            get
            {
                return this._loop;
            }
        }

        public int ZoneID
        {
            get
            {
                return this._zoneID;
            }
        }
    }


}
